.class public Lde/dealdoktor/app/fragments/DetailFragment;
.super Landroid/support/v4/app/Fragment;
.source "DetailFragment.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;
    }
.end annotation


# static fields
.field public static final TYPE_NORMAL:I = 0x0

.field public static final TYPE_SINGLE:I = 0x1

.field public static final TYPE_TOP_DEAL:I = 0x2


# instance fields
.field protected asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

.field private bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

.field private builder:Ljava/lang/StringBuilder;

.field private buttonComments:Landroid/view/View;

.field private buttonInfo:Landroid/view/View;

.field private buttonShare:Landroid/view/View;

.field private commentsWebView:Landroid/webkit/WebView;

.field private contentWrapper:Landroid/widget/LinearLayout;

.field protected cssStyle:Ljava/lang/String;

.field private currentPost:Lde/dealdoktor/app/data/PostDAO;

.field private detailsShare:Landroid/view/View;

.field private detailsWebView:Landroid/webkit/WebView;


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 91
    invoke-direct {p0}, Landroid/support/v4/app/Fragment;-><init>()V

    .line 92
    new-instance v0, Lde/dealdoktor/app/util/AsyncImageLoader;

    invoke-direct {v0}, Lde/dealdoktor/app/util/AsyncImageLoader;-><init>()V

    iput-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

    .line 95
    const-string v0, ".update { background: url(\"http://www.dealdoktor.de/wp-content/themes/inove/img/update.gif\") no-repeat scroll 3px 3px #FFF7F7;    border-color: #F5A9A9;    border-style: dashed;    border-width: 4px 0 0 4px;    margin: 5px 0;    padding: 8px 12px 8px 36px;}"

    iput-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    .line 96
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, "img{max-width:100%; height:auto; !important; table { width:95% !important; display:block; overflow:hidden; background:#FFF; border:1px solid Gold; border-width:1px; border-collapse:collapse;}"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    .line 97
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v0, "table img{max-width:60% !important; height:auto !important;} th, td { border:1px dashed Gold; text-align:left; vertical-align:center;} tr.even td {    background:#F7F7F7;} th {    background:#EDEFF0;}"

    invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    .line 98
    return-void
.end method

.method static synthetic access$0(Lde/dealdoktor/app/fragments/DetailFragment;)Lde/dealdoktor/app/data/PostDAO;
    .locals 1
    .parameter

    .prologue
    .line 44
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    return-object v0
.end method

.method static synthetic access$1(Lde/dealdoktor/app/fragments/DetailFragment;)Landroid/widget/LinearLayout;
    .locals 1
    .parameter

    .prologue
    .line 52
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;

    return-object v0
.end method

.method static synthetic access$2(Lde/dealdoktor/app/fragments/DetailFragment;Ljava/lang/StringBuilder;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 48
    iput-object p1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    return-void
.end method

.method static synthetic access$3(Lde/dealdoktor/app/fragments/DetailFragment;)Landroid/webkit/WebView;
    .locals 1
    .parameter

    .prologue
    .line 50
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    return-object v0
.end method

.method static synthetic access$4(Lde/dealdoktor/app/fragments/DetailFragment;)V
    .locals 0
    .parameter

    .prologue
    .line 481
    invoke-direct {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->loadCommentContent()V

    return-void
.end method

.method private init(Landroid/view/View;)V
    .locals 12
    .parameter "inflatedView"

    .prologue
    .line 171
    invoke-virtual {p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment;->initButtons(Landroid/view/View;)V

    .line 174
    const v0, 0x7f0b0023

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v11

    check-cast v11, Landroid/widget/ImageView;

    .line 175
    .local v11, productImageView:Landroid/widget/ImageView;
    const-string v10, ""

    .line 177
    .local v10, imageUrl:Ljava/lang/String;
    :try_start_0
    new-instance v0, Ljava/net/URI;

    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v1, v1, Lde/dealdoktor/app/data/PostDAO;->image:Ljava/lang/String;

    invoke-direct {v0, v1}, Ljava/net/URI;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/net/URI;->toASCIIString()Ljava/lang/String;
    :try_end_0
    .catch Ljava/net/URISyntaxException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v10

    .line 182
    :goto_0
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->asyncImageLoader:Lde/dealdoktor/app/util/AsyncImageLoader;

    new-instance v1, Lde/dealdoktor/app/fragments/DetailFragment$1;

    invoke-direct {v1, p0, v11}, Lde/dealdoktor/app/fragments/DetailFragment$1;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Landroid/widget/ImageView;)V

    .line 186
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getResources()Landroid/content/res/Resources;

    move-result-object v2

    const v3, 0x7f020013

    invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "xxx"

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v4, v4, Lde/dealdoktor/app/data/PostDAO;->id:I

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    .line 182
    invoke-virtual {v0, v10, v1, v2, v3}, Lde/dealdoktor/app/util/AsyncImageLoader;->loadDrawable(Ljava/lang/String;Lde/dealdoktor/app/util/AsyncImageLoader$ImageCallbackDrawable;Landroid/graphics/drawable/Drawable;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v6

    .line 187
    .local v6, cachedImage:Landroid/graphics/drawable/Drawable;
    invoke-virtual {v11, v6}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 190
    const v0, 0x7f0b001b

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v8

    check-cast v8, Landroid/widget/TextView;

    .line 191
    .local v8, detailsTitle:Landroid/widget/TextView;
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v0, v0, Lde/dealdoktor/app/data/PostDAO;->title:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v0

    invoke-virtual {v8, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 195
    :try_start_1
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    const-string v1, "http://www.dealdoktor.de/"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "<html><head><style>"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->cssStyle:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "</style></head><body>"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v3, v3, Lde/dealdoktor/app/data/PostDAO;->content:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "</body></html>"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    const/4 v5, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/webkit/WebView;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    .line 201
    :goto_1
    const v0, 0x7f0b0025

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/Button;

    .line 202
    .local v7, commentsButton:Landroid/widget/Button;
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "Kommentare ("

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v1, v1, Lde/dealdoktor/app/data/PostDAO;->commentsCount:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v1, ")"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v7, v0}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 205
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 206
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 207
    const v0, 0x7f0b0028

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 210
    const v0, 0x7f0b0024

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const v1, 0x7f020022

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 211
    const v0, 0x7f0b0025

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const v1, 0x7f02002c

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 212
    const v0, 0x7f0b0026

    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    const v1, 0x7f02002c

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 215
    invoke-virtual {p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment;->addCustomFields(Landroid/view/View;)V

    .line 217
    return-void

    .line 178
    .end local v6           #cachedImage:Landroid/graphics/drawable/Drawable;
    .end local v7           #commentsButton:Landroid/widget/Button;
    .end local v8           #detailsTitle:Landroid/widget/TextView;
    :catch_0
    move-exception v9

    .line 179
    .local v9, e:Ljava/net/URISyntaxException;
    const-string v0, "exception"

    const-string v1, "PostListing getView"

    invoke-static {v0, v1, v9}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto/16 :goto_0

    .line 196
    .end local v9           #e:Ljava/net/URISyntaxException;
    .restart local v6       #cachedImage:Landroid/graphics/drawable/Drawable;
    .restart local v8       #detailsTitle:Landroid/widget/TextView;
    :catch_1
    move-exception v9

    .line 197
    .local v9, e:Ljava/lang/Exception;
    const-string v0, "exception"

    const-string v1, "Error in DetailFragment loadDataWithBaseURL"

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_1
.end method

.method private loadCommentContent()V
    .locals 6

    .prologue
    .line 482
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    const-string v1, "http://www.dealdoktor.de/"

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "<html><head><meta http-equiv=\'Content-Type\' content=\'text/html; charset=utf-8\'/></head><body><table style=\'width:100%;border-collapse:collapse;\'>"

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "</table></body></html>"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    const-string v3, "text/html"

    const-string v4, "UTF-8"

    const/4 v5, 0x0

    invoke-virtual/range {v0 .. v5}, Landroid/webkit/WebView;->loadDataWithBaseURL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 483
    return-void
.end method

.method public static newInstance()Lde/dealdoktor/app/fragments/DetailFragment;
    .locals 4

    .prologue
    .line 64
    new-instance v1, Lde/dealdoktor/app/fragments/DetailFragment;

    invoke-direct {v1}, Lde/dealdoktor/app/fragments/DetailFragment;-><init>()V

    .line 67
    .local v1, f:Lde/dealdoktor/app/fragments/DetailFragment;
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 68
    .local v0, args:Landroid/os/Bundle;
    const-string v2, "type"

    const/4 v3, 0x1

    invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 69
    invoke-virtual {v1, v0}, Lde/dealdoktor/app/fragments/DetailFragment;->setArguments(Landroid/os/Bundle;)V

    .line 71
    return-object v1
.end method

.method public static newInstance(I)Lde/dealdoktor/app/fragments/DetailFragment;
    .locals 1
    .parameter "position"

    .prologue
    .line 75
    const/4 v0, 0x0

    invoke-static {p0, v0}, Lde/dealdoktor/app/fragments/DetailFragment;->newInstance(II)Lde/dealdoktor/app/fragments/DetailFragment;

    move-result-object v0

    return-object v0
.end method

.method public static newInstance(II)Lde/dealdoktor/app/fragments/DetailFragment;
    .locals 3
    .parameter "position"
    .parameter "type"

    .prologue
    .line 79
    new-instance v1, Lde/dealdoktor/app/fragments/DetailFragment;

    invoke-direct {v1}, Lde/dealdoktor/app/fragments/DetailFragment;-><init>()V

    .line 82
    .local v1, f:Lde/dealdoktor/app/fragments/DetailFragment;
    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    .line 83
    .local v0, args:Landroid/os/Bundle;
    const-string v2, "position"

    invoke-virtual {v0, v2, p0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 84
    const-string v2, "type"

    invoke-virtual {v0, v2, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V

    .line 85
    invoke-virtual {v1, v0}, Lde/dealdoktor/app/fragments/DetailFragment;->setArguments(Landroid/os/Bundle;)V

    .line 87
    return-object v1
.end method


# virtual methods
.method public addComment(Lde/dealdoktor/app/data/CommentDAO;)V
    .locals 3
    .parameter "comment"

    .prologue
    .line 292
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    const-string v1, "<tr style=\'width:95%;\'>"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 293
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    const-string v1, "<td  style=\'width:25%; border-bottom:1px solid #AAA; text-align:center;\'>"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 294
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "<img src=\'"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p1, Lde/dealdoktor/app/data/CommentDAO;->icon:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "\' />"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 295
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "<br/><div style=\'width:100%; text-align:center;\'><b>"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p1, Lde/dealdoktor/app/data/CommentDAO;->user:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</b></div></td>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 296
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "<td  style=\'width:70%;border-bottom:1px solid #AAA; \'><span style=\'color:#999999;\'>"

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p1, Lde/dealdoktor/app/data/CommentDAO;->date:Ljava/lang/String;

    invoke-static {v2}, Lde/dealdoktor/app/util/Util;->formatDate(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, "</span><br/>"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p1, Lde/dealdoktor/app/data/CommentDAO;->content:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 297
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    const-string v1, "</td>"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 298
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->builder:Ljava/lang/StringBuilder;

    const-string v1, "</tr>"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 299
    return-void
.end method

.method public addCustomFields(Landroid/view/View;)V
    .locals 12
    .parameter "inflatedView"

    .prologue
    const/16 v11, 0x8

    const/4 v10, 0x0

    .line 221
    const v8, 0x7f0b001f

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 222
    .local v3, rating:Landroid/widget/TextView;
    const v8, 0x7f0b001d

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    .line 223
    .local v6, sparPotential:Landroid/widget/TextView;
    const v8, 0x7f0b001c

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v7

    check-cast v7, Landroid/widget/LinearLayout;

    .line 224
    .local v7, sparPotentialLayout:Landroid/widget/LinearLayout;
    const v8, 0x7f0b001e

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/LinearLayout;

    .line 226
    .local v4, ratingLayout:Landroid/widget/LinearLayout;
    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v8, v8, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    const-string v9, ""

    if-eq v8, v9, :cond_1

    .line 227
    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v5, v8, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    .line 228
    .local v5, ratingString:Ljava/lang/String;
    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v8, v8, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    const-string v9, "0"

    invoke-virtual {v8, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_0

    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v8, v8, Lde/dealdoktor/app/data/PostDAO;->ratingScore:Ljava/lang/String;

    const-string v9, "-"

    invoke-virtual {v8, v9}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v8

    if-nez v8, :cond_0

    .line 230
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, " +"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 232
    :cond_0
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "<b>"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v8, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "</b> User-Votes"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v8

    invoke-virtual {v3, v8}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 233
    invoke-virtual {v4, v10}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 238
    .end local v5           #ratingString:Ljava/lang/String;
    :goto_0
    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v8, v8, Lde/dealdoktor/app/data/PostDAO;->sparPotential:Ljava/lang/String;

    const-string v9, ""

    if-eq v8, v9, :cond_2

    .line 239
    new-instance v8, Ljava/lang/StringBuilder;

    const-string v9, "<b>"

    invoke-direct {v8, v9}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v9, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v9, v9, Lde/dealdoktor/app/data/PostDAO;->sparPotential:Ljava/lang/String;

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "\u20ac</b> Sparpotential"

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v8

    invoke-virtual {v6, v8}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 240
    invoke-virtual {v7, v10}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 246
    :goto_1
    iget-object v8, p0, Lde/dealdoktor/app/fragments/DetailFragment;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    const-string v9, "id"

    iget-object v10, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v10, v10, Lde/dealdoktor/app/data/PostDAO;->id:I

    invoke-static {v10}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v8, v9, v10}, Lde/dealdoktor/app/db/BaseModel;->getBy(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v2

    .line 247
    .local v2, c:Landroid/database/Cursor;
    const v8, 0x7f0b0021

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 248
    .local v0, bookmark:Landroid/widget/ImageView;
    const v8, 0x7f0b0022

    invoke-virtual {p1, v8}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 249
    .local v1, bookmarkText:Landroid/widget/TextView;
    const-string v8, "als Top-Deal speichern"

    invoke-virtual {v1, v8}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 250
    invoke-interface {v2}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v8

    if-eqz v8, :cond_3

    .line 251
    const v8, 0x7f020026

    invoke-virtual {v0, v8}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 256
    :goto_2
    invoke-interface {v2}, Landroid/database/Cursor;->close()V

    .line 259
    new-instance v8, Lde/dealdoktor/app/fragments/DetailFragment$2;

    invoke-direct {v8, p0, v0}, Lde/dealdoktor/app/fragments/DetailFragment$2;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Landroid/widget/ImageView;)V

    invoke-virtual {v0, v8}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 265
    return-void

    .line 235
    .end local v0           #bookmark:Landroid/widget/ImageView;
    .end local v1           #bookmarkText:Landroid/widget/TextView;
    .end local v2           #c:Landroid/database/Cursor;
    :cond_1
    invoke-virtual {v4, v11}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_0

    .line 242
    :cond_2
    invoke-virtual {v7, v11}, Landroid/widget/LinearLayout;->setVisibility(I)V

    goto :goto_1

    .line 253
    .restart local v0       #bookmark:Landroid/widget/ImageView;
    .restart local v1       #bookmarkText:Landroid/widget/TextView;
    .restart local v2       #c:Landroid/database/Cursor;
    :cond_3
    const v8, 0x7f020027

    invoke-virtual {v0, v8}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_2
.end method

.method public addUserComment(ILde/dealdoktor/app/data/CommentDAO;)V
    .locals 2
    .parameter "postId"
    .parameter "userComment"

    .prologue
    .line 491
    const-string v0, "xxx"

    const-string v1, "called"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 492
    const-string v0, "xxx"

    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v1, v1, Lde/dealdoktor/app/data/PostDAO;->id:I

    invoke-static {v1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 493
    const-string v0, "xxx"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 495
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget v0, v0, Lde/dealdoktor/app/data/PostDAO;->id:I

    if-ne v0, p1, :cond_0

    .line 496
    const-string v0, "xxx"

    const-string v1, "matched post"

    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 497
    const-string v0, ""

    iput-object v0, p2, Lde/dealdoktor/app/data/CommentDAO;->icon:Ljava/lang/String;

    .line 499
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v0, v0, Lde/dealdoktor/app/data/PostDAO;->comments:Ljava/util/ArrayList;

    invoke-virtual {v0, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 500
    new-instance v0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;

    new-instance v1, Ljava/lang/ref/WeakReference;

    invoke-direct {v1, p0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    invoke-direct {v0, p0, v1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Ljava/lang/ref/WeakReference;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/String;

    invoke-virtual {v0, v1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 502
    :cond_0
    return-void
.end method

.method protected initButtons(Landroid/view/View;)V
    .locals 8
    .parameter "inflatedView"

    .prologue
    .line 309
    const v7, 0x7f0b0025

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/Button;

    .line 310
    .local v0, buttonComments:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$3;

    invoke-direct {v7, p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment$3;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Landroid/view/View;)V

    invoke-virtual {v0, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 316
    const v7, 0x7f0b0024

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/Button;

    .line 317
    .local v1, buttonInfo:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$4;

    invoke-direct {v7, p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment$4;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Landroid/view/View;)V

    invoke-virtual {v1, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 323
    const v7, 0x7f0b0026

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/Button;

    .line 324
    .local v2, buttonShare:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$5;

    invoke-direct {v7, p0, p1}, Lde/dealdoktor/app/fragments/DetailFragment$5;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Landroid/view/View;)V

    invoke-virtual {v2, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 330
    const v7, 0x7f0b002b

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/Button;

    .line 331
    .local v6, buttonShareTwitter:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$6;

    invoke-direct {v7, p0}, Lde/dealdoktor/app/fragments/DetailFragment$6;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;)V

    invoke-virtual {v6, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 337
    const v7, 0x7f0b0029

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/Button;

    .line 338
    .local v4, buttonShareEmail:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$7;

    invoke-direct {v7, p0}, Lde/dealdoktor/app/fragments/DetailFragment$7;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;)V

    invoke-virtual {v4, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 344
    const v7, 0x7f0b002c

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/Button;

    .line 345
    .local v3, buttonShareApps:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$8;

    invoke-direct {v7, p0}, Lde/dealdoktor/app/fragments/DetailFragment$8;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;)V

    invoke-virtual {v3, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 351
    const v7, 0x7f0b002a

    invoke-virtual {p1, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v5

    check-cast v5, Landroid/widget/Button;

    .line 352
    .local v5, buttonShareFacebook:Landroid/widget/Button;
    new-instance v7, Lde/dealdoktor/app/fragments/DetailFragment$9;

    invoke-direct {v7, p0}, Lde/dealdoktor/app/fragments/DetailFragment$9;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;)V

    invoke-virtual {v5, v7}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 358
    return-void
.end method

.method public loadComments()V
    .locals 2

    .prologue
    .line 438
    new-instance v0, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;

    new-instance v1, Ljava/lang/ref/WeakReference;

    invoke-direct {v1, p0}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    invoke-direct {v0, p0, v1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;-><init>(Lde/dealdoktor/app/fragments/DetailFragment;Ljava/lang/ref/WeakReference;)V

    const/4 v1, 0x0

    new-array v1, v1, [Ljava/lang/String;

    invoke-virtual {v0, v1}, Lde/dealdoktor/app/fragments/DetailFragment$LoadCommentsTask;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    .line 439
    return-void
.end method

.method public onClickComments(Landroid/view/View;Landroid/view/View;)V
    .locals 4
    .parameter "v"
    .parameter "inflatedlayout"

    .prologue
    const v3, 0x7f02002c

    const/16 v2, 0x8

    .line 373
    invoke-virtual {p1}, Landroid/view/View;->requestFocusFromTouch()Z

    .line 376
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->loadComments()V

    .line 378
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v2}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 379
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 380
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsShare:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 382
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonInfo:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 383
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonComments:Landroid/view/View;

    const v1, 0x7f020022

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 384
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonComments:Landroid/view/View;

    check-cast v0, Landroid/widget/Button;

    const/high16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setTextColor(I)V

    .line 385
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonShare:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 386
    return-void
.end method

.method public onClickInfo(Landroid/view/View;Landroid/view/View;)V
    .locals 4
    .parameter "v"
    .parameter "inflatedLayout"

    .prologue
    const v3, 0x7f02002c

    const/16 v2, 0x8

    .line 361
    invoke-virtual {p1}, Landroid/view/View;->requestFocusFromTouch()Z

    .line 362
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 363
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v2}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 364
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsShare:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setVisibility(I)V

    .line 366
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonInfo:Landroid/view/View;

    const v1, 0x7f020022

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 367
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonInfo:Landroid/view/View;

    check-cast v0, Landroid/widget/Button;

    const/high16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setTextColor(I)V

    .line 368
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonComments:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 369
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonShare:Landroid/view/View;

    invoke-virtual {v0, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 370
    return-void
.end method

.method public onClickShare(Landroid/view/View;Landroid/view/View;)V
    .locals 3
    .parameter "v"
    .parameter "inflatedLayout"

    .prologue
    const v2, 0x7f02002c

    const/16 v1, 0x8

    .line 389
    invoke-virtual {p1}, Landroid/view/View;->requestFocusFromTouch()Z

    .line 390
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 391
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 392
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsShare:Landroid/view/View;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 394
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonInfo:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 395
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonComments:Landroid/view/View;

    invoke-virtual {v0, v2}, Landroid/view/View;->setBackgroundResource(I)V

    .line 396
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonShare:Landroid/view/View;

    const v1, 0x7f020022

    invoke-virtual {v0, v1}, Landroid/view/View;->setBackgroundResource(I)V

    .line 397
    iget-object v0, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonShare:Landroid/view/View;

    check-cast v0, Landroid/widget/Button;

    const/high16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setTextColor(I)V

    .line 398
    return-void
.end method

.method public onClickShareApps(Landroid/view/View;)V
    .locals 3
    .parameter "v"

    .prologue
    .line 427
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.SEND"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 428
    .local v0, intent:Landroid/content/Intent;
    const-string v1, "text/plain"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 429
    const-string v1, "android.intent.extra.TEXT"

    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v2, v2, Lde/dealdoktor/app/data/PostDAO;->url:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 432
    :try_start_0
    const-string v1, "Select an action"

    invoke-static {v0, v1}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v1

    invoke-virtual {p0, v1}, Lde/dealdoktor/app/fragments/DetailFragment;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    .line 434
    :goto_0
    return-void

    .line 433
    :catch_0
    move-exception v1

    goto :goto_0
.end method

.method public onClickShareEmail(Landroid/view/View;)V
    .locals 4
    .parameter "v"

    .prologue
    .line 417
    new-instance v1, Landroid/content/Intent;

    const-string v3, "android.intent.action.SEND"

    invoke-direct {v1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 418
    .local v1, emailIntent:Landroid/content/Intent;
    const-string v3, "plain/text"

    invoke-virtual {v1, v3}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;

    .line 419
    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v2, v3, Lde/dealdoktor/app/data/PostDAO;->title:Ljava/lang/String;

    .line 420
    .local v2, subject:Ljava/lang/String;
    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v0, v3, Lde/dealdoktor/app/data/PostDAO;->url:Ljava/lang/String;

    .line 421
    .local v0, body:Ljava/lang/String;
    const-string v3, "android.intent.extra.SUBJECT"

    invoke-virtual {v1, v3, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 422
    const-string v3, "android.intent.extra.TEXT"

    invoke-virtual {v1, v3, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 423
    const-string v3, "Weitersagen..."

    invoke-static {v1, v3}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {p0, v3}, Lde/dealdoktor/app/fragments/DetailFragment;->startActivity(Landroid/content/Intent;)V

    .line 424
    return-void
.end method

.method public onClickShareFacebook(Landroid/view/View;)V
    .locals 4
    .parameter "v"

    .prologue
    .line 409
    const-string v2, "xxx"

    const-string v3, "Button FB clicked"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 410
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "http://m.facebook.com/sharer.php?u="

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v3, v3, Lde/dealdoktor/app/data/PostDAO;->url:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 411
    .local v1, url:Ljava/lang/String;
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 412
    .local v0, i:Landroid/content/Intent;
    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 413
    invoke-virtual {p0, v0}, Lde/dealdoktor/app/fragments/DetailFragment;->startActivity(Landroid/content/Intent;)V

    .line 414
    return-void
.end method

.method public onClickShareTwitter(Landroid/view/View;)V
    .locals 4
    .parameter "v"

    .prologue
    .line 401
    const-string v2, "xxx"

    const-string v3, "Button Twitter clicked"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 402
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "http://twitter.com/home?status="

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iget-object v3, v3, Lde/dealdoktor/app/data/PostDAO;->url:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 403
    .local v1, url:Ljava/lang/String;
    new-instance v0, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 404
    .local v0, i:Landroid/content/Intent;
    invoke-static {v1}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v2

    invoke-virtual {v0, v2}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    .line 405
    invoke-virtual {p0, v0}, Lde/dealdoktor/app/fragments/DetailFragment;->startActivity(Landroid/content/Intent;)V

    .line 406
    return-void
.end method

.method public onCreateView(Landroid/view/LayoutInflater;Landroid/view/ViewGroup;Landroid/os/Bundle;)Landroid/view/View;
    .locals 7
    .parameter "inflater"
    .parameter "container"
    .parameter "savedInstanceState"

    .prologue
    const/16 v6, 0xb

    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 102
    const v2, 0x7f03000e

    invoke-virtual {p1, v2, p2, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v1

    .line 104
    .local v1, view:Landroid/view/View;
    const v2, 0x7f0b0027

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/LinearLayout;

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;

    .line 107
    new-instance v0, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v2, -0x1

    const/4 v3, -0x2

    invoke-direct {v0, v2, v3}, Landroid/widget/LinearLayout$LayoutParams;-><init>(II)V

    .line 109
    .local v0, params:Landroid/widget/LinearLayout$LayoutParams;
    const/high16 v2, 0x41a0

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    invoke-virtual {v3}, Landroid/support/v4/app/FragmentActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v3

    invoke-static {v5, v2, v3}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F

    move-result v2

    float-to-int v2, v2

    invoke-virtual {v0, v4, v4, v4, v2}, Landroid/widget/LinearLayout$LayoutParams;->setMargins(IIII)V

    .line 111
    new-instance v2, Landroid/webkit/WebView;

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    .line 112
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2, v0}, Landroid/webkit/WebView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 113
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    invoke-virtual {v2, v6}, Landroid/webkit/WebSettings;->setDefaultFontSize(I)V

    .line 114
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    const-string v3, "utf-8"

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 115
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2, v4}, Landroid/webkit/WebView;->setHorizontalScrollBarEnabled(Z)V

    .line 116
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2, v3, v4}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 118
    new-instance v2, Landroid/webkit/WebView;

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    invoke-direct {v2, v3}, Landroid/webkit/WebView;-><init>(Landroid/content/Context;)V

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    .line 119
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2, v0}, Landroid/webkit/WebView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 120
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    invoke-virtual {v2, v6}, Landroid/webkit/WebSettings;->setDefaultFontSize(I)V

    .line 121
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2}, Landroid/webkit/WebView;->getSettings()Landroid/webkit/WebSettings;

    move-result-object v2

    const-string v3, "utf-8"

    invoke-virtual {v2, v3}, Landroid/webkit/WebSettings;->setDefaultTextEncodingName(Ljava/lang/String;)V

    .line 122
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->contentWrapper:Landroid/widget/LinearLayout;

    iget-object v3, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v2, v3, v5}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;I)V

    .line 124
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v2

    if-eqz v2, :cond_0

    .line 125
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v2

    const-string v3, "type"

    invoke-virtual {v2, v3}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v2

    packed-switch v2, :pswitch_data_0

    .line 133
    sget-object v2, Lde/dealdoktor/app/App;->posts:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v3

    const-string v4, "position"

    invoke-virtual {v3, v4}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lde/dealdoktor/app/data/PostDAO;

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    .line 138
    :cond_0
    :goto_0
    new-instance v2, Lde/dealdoktor/app/db/BaseModel;

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v3

    const-string v4, "bookmarks"

    invoke-direct {v2, v3, v4}, Lde/dealdoktor/app/db/BaseModel;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    .line 140
    const v2, 0x7f0b0024

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonInfo:Landroid/view/View;

    .line 141
    const v2, 0x7f0b0026

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonShare:Landroid/view/View;

    .line 142
    const v2, 0x7f0b0025

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->buttonComments:Landroid/view/View;

    .line 143
    const v2, 0x7f0b0028

    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsShare:Landroid/view/View;

    .line 145
    invoke-direct {p0, v1}, Lde/dealdoktor/app/fragments/DetailFragment;->init(Landroid/view/View;)V

    .line 147
    return-object v1

    .line 127
    :pswitch_0
    sget-object v2, Lde/dealdoktor/app/App;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    goto :goto_0

    .line 130
    :pswitch_1
    sget-object v2, Lde/dealdoktor/app/App;->topDeals:Ljava/util/ArrayList;

    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getArguments()Landroid/os/Bundle;

    move-result-object v3

    const-string v4, "position"

    invoke-virtual {v3, v4}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lde/dealdoktor/app/data/PostDAO;

    iput-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->currentPost:Lde/dealdoktor/app/data/PostDAO;

    goto :goto_0

    .line 125
    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method public onDestroyView()V
    .locals 2

    .prologue
    .line 153
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    .line 155
    .local v0, contentWrapper:Landroid/widget/LinearLayout;
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V

    .line 156
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->detailsWebView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->destroy()V

    .line 158
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->removeView(Landroid/view/View;)V

    .line 159
    iget-object v1, p0, Lde/dealdoktor/app/fragments/DetailFragment;->commentsWebView:Landroid/webkit/WebView;

    invoke-virtual {v1}, Landroid/webkit/WebView;->destroy()V

    .line 160
    invoke-super {p0}, Landroid/support/v4/app/Fragment;->onDestroyView()V

    .line 161
    return-void
.end method

.method public onResume()V
    .locals 0

    .prologue
    .line 165
    invoke-super {p0}, Landroid/support/v4/app/Fragment;->onResume()V

    .line 166
    return-void
.end method

.method public toggleBookmarkStatus(ILandroid/widget/ImageView;)V
    .locals 6
    .parameter "id"
    .parameter "view"

    .prologue
    const/4 v5, 0x0

    .line 273
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    const-string v3, "id"

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lde/dealdoktor/app/db/BaseModel;->getBy(Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    .line 274
    .local v0, c:Landroid/database/Cursor;
    invoke-interface {v0}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v2

    if-eqz v2, :cond_0

    .line 276
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    const-string v3, "id"

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lde/dealdoktor/app/db/BaseModel;->deleteBy(Ljava/lang/String;Ljava/lang/String;)V

    .line 277
    const v2, 0x7f020027

    invoke-virtual {p2, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 278
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v2

    const-string v3, "von den Top-Deals entfernt"

    invoke-static {v2, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    .line 287
    :goto_0
    invoke-interface {v0}, Landroid/database/Cursor;->close()V

    .line 288
    return-void

    .line 281
    :cond_0
    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    .line 282
    .local v1, m:Ljava/util/HashMap;,"Ljava/util/HashMap<Ljava/lang/String;Ljava/lang/String;>;"
    const-string v2, "id"

    invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 283
    iget-object v2, p0, Lde/dealdoktor/app/fragments/DetailFragment;->bookmarkModel:Lde/dealdoktor/app/db/BaseModel;

    invoke-virtual {v2, v1}, Lde/dealdoktor/app/db/BaseModel;->replace(Ljava/util/HashMap;)Z

    .line 284
    const v2, 0x7f020026

    invoke-virtual {p2, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 285
    invoke-virtual {p0}, Lde/dealdoktor/app/fragments/DetailFragment;->getActivity()Landroid/support/v4/app/FragmentActivity;

    move-result-object v2

    const-string v3, "als Top-Deal gespeichert"

    invoke-static {v2, v3, v5}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v2

    invoke-virtual {v2}, Landroid/widget/Toast;->show()V

    goto :goto_0
.end method
